public class Counter
  {
  private PowerHash ph;
  public Counter()
    {
    ph=new PowerHash();
    }
  public int get(Transition t)
    {
    int i=0;
    Object o=ph.get(t.getStart(),t.getEnd());
    if(o!=null)
      {
      i=((Integer)o).intValue();
      }
    return i;
    }
  public void inc(Transition t)
    {
    ph.put(t.getStart(),t.getEnd(),new Integer(get(t)+1));
    }
  public void dec(Transition t)
    {
    ph.put(t.getStart(),t.getEnd(),new Integer(get(t)-1));
    }
  public void clear()
    {
    ph.clear();
    }
  }
